home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pbaseiv.zip / P4UTL007.TIP < prev    next >
Text File  |  1991-12-16  |  2KB  |  47 lines

  1. The IBM PC has suffered for years from the "midnight bug,"
  2. which can cause the machine's calendar to fall behind if
  3. it's left on and not used for more than 24 hours. To get
  4. around this problem, I wrote a RAM-resident program,
  5. FIXDATE.COM, that maintains the correct date. [The file is
  6. included, in executable form, in the P4UTIL directory on
  7. your PowerBase *.* Volume IV diskette.]
  8.  
  9. Once FIXDATE.COM is created, put it in your AUTOEXEC.BAT
  10. file to keep your PC's calendar up to date.
  11.  
  12. Irwin Cohen
  13. New York
  14.  
  15. Editor's note: This program solves a problem that has
  16. plagued users since the original IBM PC was released. The
  17. PC's BIOS sets a yes/no flag--called the "midnight
  18. flag"--each time midnight passes. When DOS calls the BIOS to
  19. check the time, it receives notice that the midnight flag
  20. was raised and updates its calendar. The BIOS automatically
  21. clears the flag after the request.
  22.  
  23. The problem occurs if the computer has been completely idle
  24. while two or more midnights have passed. The next time the
  25. computer is used, DOS checks the flag, but only receives
  26. notice that the flag was raised; it has no idea that it was
  27. raised more than once. Hence, it advances the calendar by
  28. only one day, and is then a day or more behind.
  29.  
  30. A different series of events can also cause DOS to miss
  31. advancing its calendar. If another program calls the BIOS
  32. for the time before DOS does, the flag will be lowered and
  33. DOS will never notice that midnight has passed.
  34.  
  35. FIXDATE.COM solves this problem by lurking in the
  36. background, waiting for midnight to pass. At midnight, the
  37. program instantly calls DOS to check the time. To make sure
  38. no other program has an opportunity to sneak in, it's a good
  39. idea to make FIXDATE.COM the last TSR you load in your
  40. AUTOEXEC file.
  41.  
  42. Title: Squashing the Midnight Bug
  43. Category: DOS
  44. Issue date: Sep 1991
  45. Editor: Brett Glass
  46. Supplementary files: P4UTIL\FIXDATE.COM
  47.